#pragma once

#include "Animation.h"

class Entity {
public:
    float x, y, dx, dy, R, angle;
    bool life;
    std::string name;
    Animation anim;

    Entity() {
        life = 1;
    }

    void settings(Animation& a, int X, int Y, float Angle = 0, int radius = 1) {
        anim = a;
        x = X; y = Y;
        angle = Angle;
        R = radius;
    }

    virtual void update() {};

    void draw() {
        anim.sprite.setPosition(x, y);
        anim.sprite.setRotation(angle + 90);
        anim.sprite.draw();
    }

    virtual ~Entity() {};
};

